<template>
 
  <div class="form-group" style="padding-right:30px;">
    <div style="border-bottom: 1px solid rgb(221, 221, 221); margin-top: 10px;"></div>
    <div class="row">
      <div class="col-xs-12 buttom_margin top_margin">
        <span>平均購買間隔</span>
      </div>
      <div class="col-xs-12">
        <!-- <select name="buyInterval" class="form-control input-sm" v-model="buyInterval">
          <option value="oneMonth">1か月</option>
          <option value="twoMonth" >2か月</option>    
          <option value="threeMonth">3か月</option>
          <option value="oneWeek">一週間</option>
          <option value="twoWeek">二週間</option>
        </select> -->
        <el-cascader
          v-model="buyInterval"
          :options="buyInterOpt"
          :props="{ 'expandTrigger' : 'hover'}">
        </el-cascader>
      </div>
    </div>
  </div>
</template>
<script>

export default {
  name: "mdltimeCondition",
  props: {
    dateObj: {
      type: Object
    }
  },
  data: function() {
    return {
      buyInterval:[],
      buyInterOpt:[{
        value:'month',
        label:'月',
        children:[{
          value:'oneMonth',
          label:'1か月'
        },{
          value:'twoMonth',
          label:'2か月'
        },{
          value:'threeMonth',
          label:'3か月'
        }] 
      },{
        value:'week',
        label:'週',
        children: [{
          value:'oneWeek',
          label:'一週間'
        },{
          value:'twoWeek',
          label:'二週間'
        }] 
      }]
    };
  },
  computed: {
    //用于设置/返回时间类型的数据
    // dateType: {
    //   get: function() {
    //     return this.dateObj.dateType;
    //   },
    //   set: function(value) {
    //     this.$set(this.buyInterval, value);
    //   }
    // }
  },
  watch: {

  },
  created() {
    this.buyInterval='oneMonth'
  }
};
</script>
<style scoped>
span {
  font-weight: normal;
}
.left_margin {
  margin-left: 10px;
}
.hideCondition {
  display: none;
}
.buttom_margin {
  margin-bottom: 10px;
}
.top_margin {
  margin-top: 10px;
}
</style>